//
//  ZZUserInfoManager.m
//  ZuZuBao
//
//  Created by Felix on 2024/4/19.
//

#import "ZZUserInfoManager.h"

static ZZUserInfoManager * userInfoManager = nil;

@implementation ZZUserInfoManager

+ (ZZUserInfoManager *)Share
{
    if (!userInfoManager) {
        userInfoManager = [[ZZUserInfoManager alloc] init];
    }
    return userInfoManager;
}

- (id)init
{
    self = [super init];
    if (self) {
        
    }
    return self;
}

- (NSString *)uid
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"uid"];
}
- (void)setUid:(NSString *)uid
{
    [[NSUserDefaults standardUserDefaults] setObject:uid forKey:@"uid"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString *)nickName
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"nickName"];
}
- (void)setNickName:(NSString *)nickName
{
    [[NSUserDefaults standardUserDefaults] setObject:nickName forKey:@"nickName"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString *)headImg
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"headImg"];
}
- (void)setHeadImg:(NSString *)headImg
{
    [[NSUserDefaults standardUserDefaults] setObject:headImg forKey:@"headImg"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString *)phone
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"phone"];
}
- (void)setPhone:(NSString *)phone
{
    [[NSUserDefaults standardUserDefaults] setObject:phone forKey:@"phone"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

- (NSString *)token
{
    return [[NSUserDefaults standardUserDefaults] objectForKey:@"token"];
}
- (void)setToken:(NSString *)token
{
    [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"token"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

@end
